package com.brayan.melinxa.gui.panels;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextPane;
import javax.swing.BoxLayout;
import java.awt.SystemColor;
import javax.swing.JToggleButton;

public class SummaryPanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	JFileChooser dirChooser = new JFileChooser("/");

	public SummaryPanel() {
		setBackground(Color.WHITE);

		dirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		setLayout(new BorderLayout(0, 0));
		
		JPanel panel_2 = new JPanel();
		panel_2.setBackground(Color.WHITE);
		add(panel_2, BorderLayout.NORTH);
		panel_2.setLayout(new BoxLayout(panel_2, BoxLayout.Y_AXIS));
		
		JPanel panel_Top = new JPanel();
		panel_Top.setBackground(Color.WHITE);
		panel_2.add(panel_Top);
		
		Component verticalStrut = Box.createVerticalStrut(20);
		panel_Top.add(verticalStrut);

		JPanel panel_Content = new JPanel();
		panel_2.add(panel_Content);
		panel_Content.setBackground(Color.WHITE);
		panel_Content.setAlignmentY(Component.TOP_ALIGNMENT);
		GridBagLayout gbl_panel_Content = new GridBagLayout();
		gbl_panel_Content.columnWidths = new int[] { 0, 220, 0, 0 };
		gbl_panel_Content.rowHeights = new int[] { 23, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		gbl_panel_Content.columnWeights = new double[] { 0.0, 1.0, 0.0, Double.MIN_VALUE };
		gbl_panel_Content.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
		panel_Content.setLayout(gbl_panel_Content);

		Component horizontalStrut = Box.createHorizontalStrut(20);
		GridBagConstraints gbc_horizontalStrut = new GridBagConstraints();
		gbc_horizontalStrut.insets = new Insets(0, 0, 5, 5);
		gbc_horizontalStrut.gridx = 0;
		gbc_horizontalStrut.gridy = 0;
		panel_Content.add(horizontalStrut, gbc_horizontalStrut);

		JLabel labelSummary = new JLabel("Source directory");
		labelSummary.setAlignmentY(Component.TOP_ALIGNMENT);
		GridBagConstraints gbc_labelSummary = new GridBagConstraints();
		gbc_labelSummary.anchor = GridBagConstraints.WEST;
		gbc_labelSummary.insets = new Insets(0, 0, 5, 5);
		gbc_labelSummary.gridx = 1;
		gbc_labelSummary.gridy = 0;
		panel_Content.add(labelSummary, gbc_labelSummary);

		Component horizontalStrut_1 = Box.createHorizontalStrut(20);
		GridBagConstraints gbc_horizontalStrut_1 = new GridBagConstraints();
		gbc_horizontalStrut_1.insets = new Insets(0, 0, 5, 0);
		gbc_horizontalStrut_1.gridx = 2;
		gbc_horizontalStrut_1.gridy = 0;
		panel_Content.add(horizontalStrut_1, gbc_horizontalStrut_1);
				
				JLabel lblSrc = new JLabel("C:\\SourceDirectory");
				GridBagConstraints gbc_lblSrc = new GridBagConstraints();
				gbc_lblSrc.anchor = GridBagConstraints.WEST;
				gbc_lblSrc.insets = new Insets(0, 0, 5, 5);
				gbc_lblSrc.gridx = 1;
				gbc_lblSrc.gridy = 1;
				panel_Content.add(lblSrc, gbc_lblSrc);
				
				Component verticalStrut_2 = Box.createVerticalStrut(20);
				GridBagConstraints gbc_verticalStrut_2 = new GridBagConstraints();
				gbc_verticalStrut_2.insets = new Insets(0, 0, 5, 5);
				gbc_verticalStrut_2.gridx = 1;
				gbc_verticalStrut_2.gridy = 2;
				panel_Content.add(verticalStrut_2, gbc_verticalStrut_2);
				
				JLabel lblDestinationDirectory = new JLabel("Destination directory");
				GridBagConstraints gbc_lblDestinationDirectory = new GridBagConstraints();
				gbc_lblDestinationDirectory.anchor = GridBagConstraints.WEST;
				gbc_lblDestinationDirectory.insets = new Insets(0, 0, 5, 5);
				gbc_lblDestinationDirectory.gridx = 1;
				gbc_lblDestinationDirectory.gridy = 3;
				panel_Content.add(lblDestinationDirectory, gbc_lblDestinationDirectory);
				
				JLabel lblDest = new JLabel("D:\\ShadowBackup");
				GridBagConstraints gbc_lblDest = new GridBagConstraints();
				gbc_lblDest.anchor = GridBagConstraints.WEST;
				gbc_lblDest.insets = new Insets(0, 0, 5, 5);
				gbc_lblDest.gridx = 1;
				gbc_lblDest.gridy = 4;
				panel_Content.add(lblDest, gbc_lblDest);
				
				Component verticalStrut_3 = Box.createVerticalStrut(20);
				GridBagConstraints gbc_verticalStrut_3 = new GridBagConstraints();
				gbc_verticalStrut_3.insets = new Insets(0, 0, 5, 5);
				gbc_verticalStrut_3.gridx = 1;
				gbc_verticalStrut_3.gridy = 5;
				panel_Content.add(verticalStrut_3, gbc_verticalStrut_3);
				
				JToggleButton tglbtnActivateShadingProcess = new JToggleButton("Activate Shading Process");
				GridBagConstraints gbc_tglbtnActivateShadingProcess = new GridBagConstraints();
				gbc_tglbtnActivateShadingProcess.anchor = GridBagConstraints.WEST;
				gbc_tglbtnActivateShadingProcess.insets = new Insets(0, 0, 5, 5);
				gbc_tglbtnActivateShadingProcess.gridx = 1;
				gbc_tglbtnActivateShadingProcess.gridy = 6;
				panel_Content.add(tglbtnActivateShadingProcess, gbc_tglbtnActivateShadingProcess);
				
				JButton btnViewShadingProcess = new JButton("View Shading Process");
				GridBagConstraints gbc_btnViewShadingProcess = new GridBagConstraints();
				gbc_btnViewShadingProcess.anchor = GridBagConstraints.WEST;
				gbc_btnViewShadingProcess.insets = new Insets(0, 0, 5, 5);
				gbc_btnViewShadingProcess.gridx = 1;
				gbc_btnViewShadingProcess.gridy = 7;
				panel_Content.add(btnViewShadingProcess, gbc_btnViewShadingProcess);
				
				Component verticalStrut_1 = Box.createVerticalStrut(20);
				GridBagConstraints gbc_verticalStrut_1 = new GridBagConstraints();
				gbc_verticalStrut_1.insets = new Insets(0, 0, 0, 5);
				gbc_verticalStrut_1.gridx = 1;
				gbc_verticalStrut_1.gridy = 8;
				panel_Content.add(verticalStrut_1, gbc_verticalStrut_1);

		JPanel panel_Description = new JPanel();
		panel_Description.setBackground(Color.WHITE);
		add(panel_Description, BorderLayout.SOUTH);
		panel_Description.setLayout(new BoxLayout(panel_Description, BoxLayout.Y_AXIS));
		
				JSeparator separator = new JSeparator();
				panel_Description.add(separator);
		
		JPanel panel_1 = new JPanel();
		panel_Description.add(panel_1);
		panel_1.setLayout(new BoxLayout(panel_1, BoxLayout.X_AXIS));
				
				JPanel panel_Graph = new JPanel();
				panel_1.add(panel_Graph);
				panel_Graph.setBackground(SystemColor.textHighlight);
		
		JPanel panel_Detail = new JPanel();
		panel_1.add(panel_Detail);
		panel_Detail.setBackground(Color.WHITE);
		GridBagLayout gbl_panel_Detail = new GridBagLayout();
		gbl_panel_Detail.columnWidths = new int[]{0, 0, 0, 0};
		gbl_panel_Detail.rowHeights = new int[]{0, 0, 0, 0};
		gbl_panel_Detail.columnWeights = new double[]{0.0, 1.0, 0.0, Double.MIN_VALUE};
		gbl_panel_Detail.rowWeights = new double[]{0.0, 1.0, 1.0, Double.MIN_VALUE};
		panel_Detail.setLayout(gbl_panel_Detail);
		
		JSeparator separator_1 = new JSeparator();
		GridBagConstraints gbc_separator_1 = new GridBagConstraints();
		gbc_separator_1.insets = new Insets(0, 0, 5, 5);
		gbc_separator_1.gridx = 1;
		gbc_separator_1.gridy = 0;
		panel_Detail.add(separator_1, gbc_separator_1);
		
		Component horizontalStrut_2 = Box.createHorizontalStrut(20);
		GridBagConstraints gbc_horizontalStrut_2 = new GridBagConstraints();
		gbc_horizontalStrut_2.insets = new Insets(0, 0, 5, 5);
		gbc_horizontalStrut_2.gridx = 0;
		gbc_horizontalStrut_2.gridy = 1;
		panel_Detail.add(horizontalStrut_2, gbc_horizontalStrut_2);
		
		JTextPane textPaneTitle = new JTextPane();
		textPaneTitle.setContentType("text/html");
		textPaneTitle.setEditable(false);
		textPaneTitle.setText("<b>Summary</b>");
		GridBagConstraints gbc_textPaneTitle = new GridBagConstraints();
		gbc_textPaneTitle.anchor = GridBagConstraints.WEST;
		gbc_textPaneTitle.insets = new Insets(0, 0, 5, 5);
		gbc_textPaneTitle.fill = GridBagConstraints.HORIZONTAL;
		gbc_textPaneTitle.gridx = 1;
		gbc_textPaneTitle.gridy = 1;
		panel_Detail.add(textPaneTitle, gbc_textPaneTitle);
		
		Component horizontalStrut_3 = Box.createHorizontalStrut(20);
		GridBagConstraints gbc_horizontalStrut_3 = new GridBagConstraints();
		gbc_horizontalStrut_3.insets = new Insets(0, 0, 5, 0);
		gbc_horizontalStrut_3.gridx = 2;
		gbc_horizontalStrut_3.gridy = 1;
		panel_Detail.add(horizontalStrut_3, gbc_horizontalStrut_3);
		
		JTextPane txtpnDescription = new JTextPane();
		txtpnDescription.setText("This is your summary. Verify your source and destination directory and ensure there's enough space on the destination device. If you are ready, activate the shading process.");
		GridBagConstraints gbc_txtpnDescription = new GridBagConstraints();
		gbc_txtpnDescription.insets = new Insets(0, 0, 0, 5);
		gbc_txtpnDescription.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtpnDescription.gridx = 1;
		gbc_txtpnDescription.gridy = 2;
		panel_Detail.add(txtpnDescription, gbc_txtpnDescription);
		this.repaint();
	}

}
